-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing embedded ansible persisters dependencies #17574
Missing embedded ansible persisters dependencies #17574
Conversation
@jameswnl it seems it is failing in one test: https://travis-ci.org/ManageIQ/manageiq/jobs/391635305 I'm not sure how this error happens, local test is ok. |
@jameswnl @slemrmartin looks to me that the correct STI class should be |
@jameswnl @slemrmartin actually, to be consistent with other providers we should be using Also its seems like we do have a lot of empty abstract classes there, so the ansible codebase would deserve a cleanup. :-) |
@jameswnl it seems like problem is in spec, not in my code, right? But I don't know how to simulate travis error, do you know? |
@slemrmartin yeah, I think so. But the problem I have is same as you - don't know how to reproduce travis error locally. |
travis fixed in ManageIQ/manageiq-providers-ansible_tower#104 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@agrare in other providers we always have STI classes aligned with the manager class (except for few storage providers). But here, we don't have those classes defined for some reason.
@slemrmartin if it's cyclical @agrare will have to merge them at the same time
@slemrmartin @Ladas @jameswnl I think the problem is that the old interface was setting the STI class incorrectly. Even though it is "wrong" without a data migration to correct it the new interface should be compatible with the old interface. This new interface should set the same STI classes as the old one even if the old one wasn't correct. If you put a PR in to fix existing data then we can fix it here. |
ce7274b
to
7358e42
Compare
From old to new interface
manager module forced to AutomationManager
7358e42
to
84de5d2
Compare
@agrare do you want to see Rails in action? :)
|
9967656
to
71875db
Compare
@jameswnl because A weird behaviour I wrote above is performed also for new method. For EmbeddedAnsible it was unpredictable which class is chosen by autoloader. So I think these specs worked only with some luck before. |
Safe_constantize can autoload different classes than expected.
71875db
to
e67709b
Compare
Checked commits slemrmartin/manageiq@617b637~...e67709b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
From old to new interface
Fixes problem https://travis-ci.org/ManageIQ/manageiq/jobs/391452668
ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::AutomationManager / ConfigurationScriptSource includes removed mixins (ManageIQ/manageiq-providers-ansible_tower#81)
Reverting fix: ManageIQ/manageiq-providers-ansible_tower#97 (this is intended to replace them)